/*
 * This class is for compositePattern method，it implements TransparentCompositePatternComponent,inside the operations,
 * it ask for  TransparentCompositePatternComponent.
 * 
 * Composite can do some operation to its children.
 * 
 * public:
 * 		public String operation(TransparentCompositePatternComponent c) ;
 * 		public String add(TransparentCompositePatternComponent c);
 * 		public String remove(TransparentCompositePatternComponent c);
 * 		public String update(TransparentCompositePatternComponent c); 
 */
package compositePattern;

public class TransparentCompositePatternComposite implements TransparentCompositePatternComponent{

	/*
	 * (non-Javadoc)
	 * The composite need to override all the method of interface
	 */
	
	@Override
	public String operation(TransparentCompositePatternComponent c) {
		return "I am the composite of TransparentCompositePanttern";
	}

	@Override
	public String add(TransparentCompositePatternComponent c) {
		return "Add a component";
	}

	@Override
	public String remove(TransparentCompositePatternComponent c) {
		return "Remove a component";
	}

	@Override
	public String update(TransparentCompositePatternComponent c) {
		return "Update a component";
	}
}
